package com.teamone.monopoly.domain;

public class TaxSquare extends Square {

	public static final String NAME = "TaxSquare";
	
	TaxSquare() {
		name = NAME;
	}
	
	private float calcTax(float cash) {
		return (Math.min((cash*10)/100, 200));
	}

	@Override
	public void onLand(Player player) {
		player.subCash(calcTax(player.getNetWorth()));
	}

}
